﻿//-----------------------------------------------------------------------
// <copyright file="IRuleConfiguration.cs">
//     Copyright (c) Nicole Calinoiu. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
using System;
using System.Collections.Generic;

namespace Bordecal.FxCop.Sdk
{
	/// <summary>
	/// Interface for a rule configuration type that can be converted back and forth from a string dictionary.
	/// </summary>
	public interface IRuleConfiguration
	{
		/// <summary>
		/// Gets the settings as a string dictionary.
		/// </summary>
		Dictionary<string, string> Settings { get; }

		/// <summary>
		/// Creates a string dictionary from the current configuration instance.
		/// </summary>
		/// <returns>A string dictionary representing the current configuration.</returns>
		Dictionary<string, string> ToDictionary();

		/// <summary>
		/// Initializes a configuration instance from a string dictionary.
		/// </summary>
		/// <param name="dictionary">The dictionary of property names and values.</param>
		void LoadFromDictionary(Dictionary<string, string> dictionary);
	}
}